﻿namespace Simple.Services;

public class StaffAttendanceRuleQueryPageInputModel : PageInputModel
{
    /// <summary>
    /// 考勤组名称
    /// </summary>
    public string Name { get; set; } = "";
}

public class StaffAttendanceRuleInputModel
{
    /// <summary>
    /// 考勤组Id
    /// </summary>
    public Guid? Id { get; set; } = null;

}

/// <summary>
/// 员工考勤统计查询
/// </summary>

public class StaffAttendanceStatisticsReportInputModel : PageInputModel
{
    /// <summary>
    /// 年月
    /// </summary>
    public DateTime? Date { get; set; } = DateTime.Now;

    /// <summary>
    /// 人员姓名
    /// </summary>
    public string UserName { get; set; } = "";

    /// <summary>
    /// 部门Id
    /// </summary>
    public Guid? OrganizationId { get; set; } = null;
}

/// <summary>
/// 
/// </summary>
public class StaffAttendanceStatisticsReportOutputModel : ModelBase
{
    public Guid? UserId { get; set; }

    public string UserName { get; set; } = "";

    public Guid? OrganizationId { get; set; }

    public string OrganizationName { get; set; } = "";

    /// <summary>
    /// 应出
    /// </summary>
    public int Due { get; set; } = 0;

    /// <summary>
    /// 实出
    /// </summary>
    public int ActualOutput { get; set; } = 0;

    /// <summary>
    /// 未签到
    /// </summary>
    public int NotSignedIn { get; set; } = 0;
}

/// <summary>
/// 
/// </summary>
public class StaffAttendanceRecordOutputModel
{
    public Guid? UserId { get; set; }

    public string UserName { get; set; } = "";

    public Guid? OrganizationId { get; set; }

    public string OrganizationName { get; set; } = "";

    /// <summary>
    /// 工号
    /// </summary>
    public string UserNumber { get; set; } = "";

    /// <summary>
    /// 打卡时间
    /// </summary>
    public DateTime? ClockingTime { get; set; }

    /// <summary>
    /// 进门方式：1入校，2出校
    /// </summary>
    public int? EntranceType { get; set; }
}

/// <summary>
/// PC端日历数据格式显示
/// </summary>
public class StaffAttendanceRecordOutputModel2
{
    /// <summary>
    /// 当日上下班时间
    /// </summary>
    public string Title { get; set; } = "";

    /// <summary>
    /// 考勤日期
    /// </summary>
    public string Start { get; set; } = "";

    /// <summary>
    /// 考勤日期
    /// </summary>
    public string End { get; set; } = "";

    /// <summary>
    /// 样式
    /// </summary>
    public string CssClass { get; set; } = "red";
}


/// <summary>
/// 员工考勤统计查询
/// </summary>

public class StaffAttendanceRecordByUserIdInputModel
{
    /// <summary>
    /// 年月
    /// </summary>
    public DateTime? Date { get; set; } = DateTime.Now;

    /// <summary>
    /// 人员Id
    /// </summary>
    [Required(ErrorMessage = "考勤人员Id不能为Null")]
    public Guid? UserId { get; set; }

}

/// <summary>
/// 员工考勤统计查询
/// </summary>

public class MoveStaffAttendanceRecordInputModel
{
    /// <summary>
    /// 年月
    /// </summary>
    public DateTime? Date { get; set; } = DateTime.Now;
}


/// <summary>
/// 移动端日历数据格式显示
/// </summary>
public class MoveStaffAttendanceRecordOutputModel
{
    /// <summary>
    /// 考勤日期
    /// </summary>
    public string Date { get; set; } = "";

    /// <summary>
    /// 考勤说明
    /// </summary>
    public string Info { get; set; } = "";

    /// <summary>
    /// 打卡数据
    /// </summary>
    public StaffAttendanceData Data { get; set; } = new StaffAttendanceData();
}

public class StaffAttendanceData
{
    public string Shangbanka { get; set; } = "";

    public string Xiabanka { get; set; } = "";
}

/// <summary>
/// 按日统计打卡情况model
/// </summary>
public class MoveStaffAttendanceRecordStatisticsOutputModel
{
    /// <summary>
    /// 早上
    /// </summary>
    public MoveStaffAttendanceRecordDeptStatisticsOutputModel Morning { get; set; }

    /// <summary>
    /// 晚上
    /// </summary>
    public MoveStaffAttendanceRecordDeptStatisticsOutputModel Night { get; set; }

    /// <summary>
    /// 考勤日期
    /// </summary>
    public string Date { get; set; }
}

/// <summary>
/// 按日统计打卡情况model
/// </summary>
public class MoveStaffAttendanceRecordDeptStatisticsOutputModel
{
    /// <summary>
    /// 总计人数
    /// </summary>
    public int Total { get; set; }

    /// <summary>
    /// 打卡人数
    /// </summary>
    public int ClockTotal { get; set; }

    /// <summary>
    /// 迟到人数
    /// </summary>
    public int LateTotal { get; set; }

    /// <summary>
    /// 总打卡率
    /// </summary>
    public string PunchRate { get; set; }

    /// <summary>
    /// 记录明细
    /// </summary>
    public List<MoveStaffAttendanceRecordDetailsDeptOutputModel> RecordDetails { get; set; }
}


/// <summary>
/// 按部门打卡人数明细
/// </summary>
public class MoveStaffAttendanceRecordDetailsDeptOutputModel
{
    /// <summary>
    /// 部门Id
    /// </summary>
    public Guid DeptId { get; set; }

    /// <summary>
    /// 部门名称
    /// </summary>
    public string DeptName { get; set; }

    /// <summary>
    /// 总人数
    /// </summary>
    public int Total { get; set; }

    /// <summary>
    /// 打卡率
    /// </summary>
    public string PunchRate { get; set; }

    /// <summary>
    /// 当日打卡人数
    /// </summary>
    public int PuncherTotal { get; set; }

    /// <summary>
    /// 迟到或早退人数
    /// </summary>
    public int LateOrleaveEarly { get; set; }
}


/// <summary>
/// 首页统计打卡情况model
/// </summary>
public class MoveStaffAttendanceRecordStatisticsCurrentDayOutputModel
{
    /// <summary>
    /// 当日打卡人数
    /// </summary>
    public int PuncherTotal { get; set; }

    /// <summary>
    /// 当日未打卡人数
    /// </summary>
    public int NoPuncherTotal { get; set; }

    /// <summary>
    /// 本月打卡率
    /// </summary>
    public string PunchRate { get; set; }
}

/// <summary>
/// 首页统计打卡情况model
/// </summary>
public class MoveStaffAttendanceRecordStatisticsDayOutputModel
{
    /// <summary>
    /// 当日打卡人数
    /// </summary>
    public int PuncherTotal { get; set; }

    /// <summary>
    /// 当日未打卡人数
    /// </summary>
    public int NoPuncherTotal { get; set; }

    /// <summary>
    /// 应打卡人数
    /// </summary>
    public int PuncherUserNumber { get; set; }
}
